<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE xsl:stylesheet SYSTEM "lang://people">

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<!-- BLOCK STAT -->
	<xsl:template match="gender" mode="block-stat">
		<xsl:text>&labelMen;: </xsl:text>
		<xsl:value-of select="man" />
		<br /><xsl:text>&labelWomen;: </xsl:text>
		<xsl:value-of select="woman" />
		<br /><xsl:text>&labelNoGender;: </xsl:text>
		<xsl:value-of select="other" />
	</xsl:template>
	
	<!-- BLOCK COUNTRIES -->
	<xsl:template match="countries" mode="block-countries">
		<div class="cloud">
			<xsl:for-each select="country">
				<a class="item">
					<xsl:attribute name="href">
						<xsl:value-of select="concat ($baseURI, '/people/search?filter[country]=', value)" />
					</xsl:attribute>
					<xsl:attribute name="style">
						<xsl:value-of select="concat ('font-size: ', size, 'px')" />
					</xsl:attribute>
					<xsl:value-of select="value" />
				</a>
				<xsl:text> </xsl:text>
			</xsl:for-each>
		</div>
	</xsl:template>
	
	<!-- BLOCK CITIES -->
	<xsl:template match="cities" mode="block-cities">
		<div class="cloud">
			<xsl:for-each select="city">
				<a class="item">
					<xsl:attribute name="href">
						<xsl:value-of select="concat ($baseURI, '/people/search?filter[city]=', value)" />
					</xsl:attribute>
					<xsl:attribute name="style">
						<xsl:value-of select="concat ('font-size: ', size, 'px')" />
					</xsl:attribute>
					<xsl:value-of select="value" />
				</a>
				<xsl:text> </xsl:text>
			</xsl:for-each>
		</div>
	</xsl:template>

</xsl:stylesheet>